import { createRouter, createWebHistory } from 'vue-router';
import Home from '@/views/Home.vue';
import CodeNotes from '@/views/CodeNotes.vue';
import DiaryNotes from '@/views/DiaryNotes.vue';
import TodoNotes from '@/views/TodoNotes.vue';
import NoteEditor from '@/views/NoteEditor.vue';

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/code',
    name: 'CodeNotes',
    component: CodeNotes
  },
  {
    path: '/diary',
    name: 'DiaryNotes',
    component: DiaryNotes
  },
  {
    path: '/todo',
    name: 'TodoNotes',
    component: TodoNotes
  },
  {
    path: '/editor/:type/:id?',
    name: 'NoteEditor',
    component: NoteEditor,
    props: true
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router; 